import React from 'react'
import { DatePicker, Space } from 'antd';
import type { DatePickerProps, GetProps } from 'antd';

import './Css/User_analytics_component.css'

type RangePickerProps = GetProps<typeof DatePicker.RangePicker>;

const { RangePicker } = DatePicker;

const onOk = (value: DatePickerProps['value'] | RangePickerProps['value']) => {
    console.log('onOk: ', value);
};


export default function Title(props) {
    return (
        <div className='Title'>
            <span style={{fontSize:'0.35rem',padding:'0.3rem'}}>
                {props.title}
            </span>
            <div>
                数据指标？
                <RangePicker
                    showTime={{ format: 'HH:mm' }}
                    format="YYYY-MM-DD HH:mm"
                    onChange={(value, dateString) => {
                        console.log('Selected Time: ', value);
                        console.log('Formatted Selected Time: ', dateString);
                    }}
                    onOk={onOk}
                />
            </div>
        </div>
    )
}
